package com.bjpowernode.springboot.web.controller;

import com.bjpowernode.springboot.domain.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * CreateTime：2020/8/31 19:23
 */

@Controller
@RequestMapping("/user")
public class UserController {

    @Autowired
    private User user;

    @RequestMapping("/getUser")
    public String getUser(Model model){
        model.addAttribute("user",user);
        return "index";
    }
}
